home *** CD-ROM | disk | FTP | other *** search
/ Role Playing DB 2.1 / Role Playing DB 2.1.iso / RPGSoftware / Makefile < prev    next >
Makefile  |  2001-01-28  |  5KB  |  137 lines

  1. FREEWRAP    = /usr/local/bin/freewrap
  2. IMAGES        = DeepwoodsBanner.gif minimize.gif exit.gif gnu-head-sm.gif \
  3.          help.gif install.gif RPG-logo.gif RPG-Windows.gif \
  4.          RPG-Linux.gif Cover1.gif
  5. OtherFiles    = README COPYING README.Windows README.Linux InstallHelp.text
  6. RELEASEFILES    = Linux/RPG \
  7.           Windows/RPG.exe Windows/tclpip83.dll \
  8.           Doc/RPG_UserManual.pdf \
  9.           Doc/CxxInternals.pdf Doc/TclInternals.pdf \
  10.             Doc/SwigInternals.pdf 
  11. TCLPIP83    = /usr/local/cross-tools/freewrapWin32/tclpip83.dll
  12. CC        = cc
  13. XCC        = i386-mingw32-gcc
  14. BaseCFLAGS    = -g -O2
  15. DEFS        =  -DSTDC_HEADERS=1 -DSIZEOF_LONG=4 -DSIZEOF_INT=4 -DHAVE_BOOL=1 
  16. SHLIB_CFLAGS    = -fPIC
  17. XSHLIB_CFLAGS   = 
  18. SHLIB_SUFFIX    = .so
  19. SHLIB_LD        = cc -shared
  20. TCL_VERSION    = 8.3
  21. VERSION        = 8.3
  22. TCL_PREFIX      = /usr/local
  23. TCL_EXEC_PREFIX    = /usr/local
  24. TCL_CFLAGS      = 
  25. TCL_DEFS    =  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1  -DUSE_TCL_STUBS
  26. TCL_DBGX    = 
  27. TCLSH        = /usr/local/bin/tclsh8.3
  28. TCL_LIB_SPEC    = -L/usr/local/lib -ltcl8.3${TCL_DBGX}
  29. TCL_SHARED_LIBS    = -L/usr/local/lib -ltclstub8.3${TCL_DBGX}
  30. INCLUDES        = -I$(TCL_PREFIX)/include -I.
  31. TCL_SHARED_LIBS    = -L/usr/local/cross-tools/Win32/lib -ltclstub83
  32. XTCL_DEFS    =  -DTCL_THREADS=1  -DUSE_TCL_STUBS
  33. DLLWRAP        = /usr/local/cross-tools/bin/i386-mingw32-dllwrap
  34. DRIVER        = /usr/local/cross-tools/bin/i386-mingw32-gcc
  35. DLLTOOL        = /usr/local/cross-tools/bin/i386-mingw32-dlltool
  36. XAS        = /usr/local/cross-tools/bin/i386-mingw32-as
  37. XRANLIB        = /usr/local/cross-tools/bin/i386-mingw32-ranlib
  38. XTCL_INC_DIR    = /usr/local/cross-tools/Win32/include
  39. XINCLUDES        = -I$(XTCL_INC_DIR) -I.
  40. SWIG        = /usr/local/bin/swig -tcl
  41. TARGET        = diskfree
  42. INTERFACE    = $(TARGET).i
  43. SRCS        = $(TARGET)_wrap.c
  44. OBJS        = $(TARGET)_wrap.o
  45. XOBJS        = i386-ming32/$(TARGET)_wrap.o
  46. CFLAGS = $(DEFS) $(TCL_DEFS) $(BaseCFLAGS) $(SHLIB_CFLAGS) $(INCLUDES) -c -Wall
  47. XCFLAGS = $(DEFS) $(XTCL_DEFS) $(BaseCFLAGS) $(XSHLIB_CFLAGS) $(INCLUDES) -c -Wall
  48. FREEWRAPW32    = /usr/local/cross-tools/freewrapWin32/freewrap.exe
  49.  
  50. all: setup setup.exe RPGShipping.tar.gz
  51.  
  52. $(SRCS) : $(INTERFACE)
  53.     $(SWIG) $(INTERFACE)
  54.  
  55. $(TARGET)_wrap.o : $(TARGET)_wrap.c
  56.     $(CC) $(CFLAGS) -o $(TARGET)_wrap.o -c $(TARGET)_wrap.c
  57.  
  58. i386-ming32/$(TARGET)_wrap.o : $(TARGET)_wrap.c
  59.     $(XCC) $(CFLAGS) -o i386-ming32/$(TARGET)_wrap.o -c $(TARGET)_wrap.c
  60.     
  61. $(TARGET).so : $(TARGET)_wrap.o
  62.     $(SHLIB_LD) -o $(TARGET).so $(TARGET)_wrap.o $(TCL_SHARED_LIBS)
  63.  
  64. $(TARGET).dll : i386-ming32/$(TARGET)_wrap.o $(TARGET).def
  65.     $(DLLWRAP) --entry _DllMainCRTStartup@12 -dll \
  66.       --verbose \
  67.       --target i386-mingw32 \
  68.       --dllname $(TARGET).dll \
  69.       --def $(TARGET).def \
  70.       --as $(XAS) \
  71.       i386-ming32/$(TARGET)_wrap.o \
  72.       -Wl,-s \
  73.       -Wl,$(TCL_SHARED_LIBS) \
  74.       -Wl,-lcrtdll -Wl,-lkernel32
  75.  
  76. $(TARGET).def : 
  77.     echo 'EXPORTS' >$(TARGET).def
  78.     echo '    Diskfree_Init' >>$(TARGET).def
  79.  
  80.  
  81. setup: $(IMAGES) setup.tcl $(TARGET).so $(OtherFiles)
  82.     $(FREEWRAP) setup.tcl -e $(OtherFiles) $(IMAGES) $(TARGET).so
  83.  
  84. setup.exe: $(IMAGES) setup.tcl $(TARGET).dll $(OtherFiles)
  85.     $(FREEWRAP) setup.tcl -e -w $(FREEWRAPW32) $(OtherFiles) $(IMAGES) \
  86.         $(TARGET).dll
  87.  
  88.  
  89. RPGShipping.tar.gz : setup setup.exe $(RELEASEFILES) $(OtherFiles)
  90.     tar czvhf RPGShipping.tar.gz $(OtherFiles) setup setup.exe \
  91.         $(RELEASEFILES) Makefile
  92.  
  93.  
  94. README : ../README
  95.     ln -sf ../README ./
  96. README.Windows : ../README.Windows
  97.     ln -sf ../README.Windows ./
  98. README.Linux : ../README.Linux
  99.     ln -sf ../README.Linux ./
  100. COPYING    : ../COPYING
  101.     ln -sf ../COPYING ./
  102.  
  103. Doc/CxxInternals.pdf : ../Doc/Internals/CxxInternals.pdf
  104.     ln -sf ../../Doc/Internals/CxxInternals.pdf Doc/
  105. Doc/TclInternals.pdf : ../Doc/Internals/TclInternals.pdf
  106.     ln -sf ../../Doc/Internals/TclInternals.pdf Doc/
  107. Doc/SwigInternals.pdf : ../Doc/Internals/SwigInternals.pdf
  108.     ln -sf ../../Doc/Internals/SwigInternals.pdf Doc/
  109. Doc/RPG_UserManual.pdf : ../Doc/User/RPG_UserManual.pdf
  110.     ln -sf ../../Doc/User/RPG_UserManual.pdf Doc/
  111.  
  112. Linux/RPG : ../RPG
  113.     ln -sf ../../RPG Linux/
  114.  
  115. Windows/RPG.exe : ../C++/i386-mingw32/RPG.exe
  116.     ln -sf ../../C++/i386-mingw32/RPG.exe Windows/
  117.  
  118. Windows/tclpip83.dll : $(TCLPIP83)
  119.     ln -sf $(TCLPIP83) Windows/
  120.  
  121.  
  122. ../Doc/Internals/CxxInternals.pdf : 
  123.     $(MAKE) -C ../Doc/Internals CxxInternals.pdf
  124. ../Doc/Internals/TclInternals.pdf : 
  125.     $(MAKE) -C ../Doc/Internals TclInternals.pdf
  126. ../Doc/Internals/SwigInternals.pdf : 
  127.     $(MAKE) -C ../Doc/Internals SwigInternals.pdf
  128.  
  129. ../Doc/User/RPG_UserManual.pdf : 
  130.     $(MAKE) -C ../Doc/User RPG_UserManual.pdf 
  131.  
  132. ../RPG : 
  133.     $(MAKE) -C .. RPG
  134.  
  135. ../C++/i386-mingw32/RPG.exe :
  136.     $(MAKE) -C ../C++/i386-mingw32 RPG.exe
  137.